main: Rework sub states in STATE_TRIGGERING#126
Merged
jtguggedal merged 1 commit intomainfrom Mar 21, 2025
Merged
Conversation
72a5e2a to
c49bd49
Compare
Contributor
There was a problem hiding this comment.
🎯 Core Changes
- The code refactors the state machine in the
main.cfile, specifically the sub-states withinSTATE_TRIGGERING. The changes introduce a dedicated wait state (STATE_WAIT_FOR_TRIGGER) and a more structured approach to sampling intervals, improving the accuracy and management of these intervals. - The test files have been updated to reflect these changes, including adjustments to the state transitions and the addition of new test cases to ensure the correct interval is maintained over time.
- No critical concerns identified. The changes seem to be well-structured and aim to improve the functionality and accuracy of the state machine.
- Verdict:
- Approve: The changes are well-implemented and improve the existing functionality. The refactoring of the state machine is clear and the tests have been updated accordingly to ensure the new logic is validated.
Code review performed by OPENAI - gpt-4o.
2c380bb to
4aa8d46
Compare
The sub states in STATE_TRIGGERING have been updated to allow for a dedicated wait state, and to make it easier to have accurate intervals between samples. Tests are updated, and we now also test that the correct interval is maintained over time. Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
4aa8d46 to
8a7b9c8
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



The sub states in STATE_TRIGGERING have been updated to allow for a dedicated wait state, and to make it easier to have accurate intervals between samples.
Tests are updated, and we now also test that the correct interval is maintained over time.